
#include "AddMultiVariable.h"
//#include "FEProblem.h"

// registerMooseAction("parakeetApp", AddMultiVariable, "add_variable");

template<>
InputParameters validParams<AddMultiVariable>()
{
  InputParameters params = validParams<AddVariableAction>();
  params.addRequiredParam<std::vector<NonlinearVariableName> >("variables", "非线性变量");

  return params;
}

AddMultiVariable::AddMultiVariable(InputParameters params) :
	AddVariableAction(params)
{
}

void AddMultiVariable::act()
{
	std::vector<NonlinearVariableName> variables = getParam<std::vector<NonlinearVariableName> >("variables");
	// for (int i = 0; i < variables.size(); ++i)
	// {
	// 	// init();
	// 	std::string var_name = variables[i];
	// 	std::cout << var_name << std::endl;
	// 	// addVariable(var_name);
	// 	_problem->addVariable(var_name, _fe_type, 1);

	// 	// if (_moose_object_pars.isParamValid("initial_condition"))
    // 		// createInitialConditionAction();
	// }
	for(auto& var : variables)
	{
				std::cout << var << std::endl;

		_problem->addVariable(var, _fe_type, 1);
	}
}
